package com.peng.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

/**
 * @author love_ovo
 * @ClassName XiaoZiAgent.java
 * @createTime 2025年05月24日 19:34:00
 */
@AiService(
        wiringMode = EXPLICIT,
        //chatModel = "qwenChatModel",
        streamingChatModel = "qwenStreamingChatModel",
        chatMemoryProvider = "chatMemoryProviderAgent",
        tools = "appointmentTools",
        contentRetriever = "contentRetrieverXiaoziPincone" //配置向量存储
)
public interface XiaoZiAgent {

    /*@SystemMessage(fromResource = "xiaozi-prompt-template.txt")
    String chat(@MemoryId Long memoryId, @UserMessage String userMessage);*/

    @SystemMessage(fromResource = "xiaozi-prompt-template.txt")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);

}
